/**
 * @file Banner/index.mobile.css
 * @description Banner组件移动端样式 - 实现左右滑动卡片效果
 * @copyright 版权所有 (c) 2025 UIED技术团队
 * @website https://fsuied.com
 * @license MIT
 * @version 1.0.0
 */

/* 移动端专用样式 - 仅在768px以下设备生效 */
@media (max-width: 768px) {
  .banner-section {
    padding: 0.75rem 0;
    overflow: hidden;
  }
  
  .banner-container {
    padding: 0;
    max-width: 100%;
  }
  
  /* 移动端滑动卡片容器 */
  .banner-cards {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 0 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    grid-template-columns: none; /* 覆盖网格布局 */
  }
  
  /* 隐藏滚动条 */
  .banner-cards::-webkit-scrollbar {
    display: none;
  }
  
  /* 移动端卡片样式 */
  .banner-card {
    flex: 0 0 auto;
    width: 240px; /* 固定宽度确保一排显示 */
    min-width: 240px;
    padding: 1rem;
    border-radius: 0.875rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 固定渐变背景色 */
    background: linear-gradient(135deg, 
      color-mix(in srgb, var(--card-color, var(--primary-color)) 8%, var(--card-bg) 92%) 0%,
      color-mix(in srgb, var(--card-color, var(--primary-color)) 4%, var(--card-bg) 96%) 100%
    );
    border-color: color-mix(in srgb, var(--card-color, var(--primary-color)) 20%, var(--border-color) 80%);
    box-shadow: none; /* 移除阴影 */
  }
  
  /* 移动端点击效果 */
  .banner-card:active {
    transform: scale(0.98);
          box-shadow: none; /* 移除阴影 */
  }
  
  /* 移动端图标样式 */
  .banner-card-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-color, var(--primary-color));
    color: white;
          box-shadow: none; /* 移除阴影 */
  }
  
  /* 移动端内容区域 */
  .banner-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0; /* 确保文本可以正确截断 */
  }
  
  /* 移动端标题和徽章 */
  .banner-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .banner-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }
  
  .banner-card-badge {
    font-size: 0.5rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--card-color, var(--primary-color));
    color: white;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  
  .banner-card-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin: 0;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
  }
  
  /* 移动端装饰效果去除 */
  .banner-card-decoration,
  .banner-card-gradient {
    display: none;
  }
  
  /* 超小屏幕适配 */
  @media (max-width: 480px) {
    .banner-cards {
      padding: 0 0.75rem;
      gap: 0.625rem;
    }
    
    .banner-card {
      width: 220px;
      min-width: 220px;
      padding: 0.875rem;
    }
    
    .banner-card-icon {
      width: 38px;
      height: 38px;
    }
    
    .banner-card-title {
      font-size: 0.8rem;
      max-width: 120px;
    }
    
    .banner-card-description {
      font-size: 0.7rem;
      -webkit-line-clamp: 1;
    }
  }
  
  /* 极小屏幕适配 */
  @media (max-width: 360px) {
    .banner-cards {
      padding: 0 0.5rem;
      gap: 0.5rem;
    }
    
    .banner-card {
      width: 200px;
      min-width: 200px;
      padding: 0.75rem;
    }
    
    .banner-card-icon {
      width: 36px;
      height: 36px;
    }
    
    .banner-card-title {
      font-size: 0.75rem;
      max-width: 100px;
    }
    
    .banner-card-description {
      font-size: 0.65rem;
    }
  }
} 